package routers

import (
	"github.com/gin-contrib/cors"
	"github.com/gin-gonic/gin"
	"repo-nav/handlers"
)

func Init() *gin.Engine {
	r := gin.Default()
	r.Use(cors.Default())
	r.Static("static", "./static")

	r.POST("add", handlers.Add)
	r.GET("list", handlers.List)

	return r
}
